import request from '@/utils/request'
import axios from 'axios'
// 管理后台登录
export function login(data) {
  return request({
    url: '/user/manager/console/login',
    method: 'post',
    data
  })
}

// 取普通用户的信息
export function getUerInfo(data) {
  return request({
    url: '/user/manager/get/client/info/byId',
    method: 'post',
    data
  })
}



// 添加用户
export function add(data) {
  return request({
    url: '/user/manager/platform/userAdd',
    method: 'post',
    data
  })
}

// 修改用户
export function edit(data) {
  return request({
    url: '/user/manager/platform/userModify',
    method: 'post',
    data
  })
}


//用户列表查询
export function list(data) {
  return request({
    url: '/user/manager/console/user/list',
    method: 'post',
    data
  })
}



// 删除用户
export function del(data) {
  return request({
    url: '/user/manager/platform/userDel',
    method: 'post',
    data
  })
}


// 平台用户停用或启用
export function set(data) {
  return request({
    url: '/user/manager/enable/disable/us',
    method: 'post',
    data
  })
}



// 平台用户停用或启用
export function setState(data) {
  return request({
    url: '/user/manager/enable/disable/user',
    method: 'post',
    data
  })
}




export function editPwd(data) {
  return request({
    url: '/user/manager/console/reset/pswd',
    method: 'post',
    data
  })
}

// export function getInfo2(params) {
//   return request({
//     url: '/spcolumn/web/dict/getConstants/market',
//     method: 'get',
//     params
//   })
// }


// export function combinedLoginAndInfo(data) {
//   console.log(axios)
//   return axios.all([
//     getInfo(data),
//     getInfo2(data) 
//   ]).then(axios.spread((loginResponse, infoResponse) => {
//     return { login: loginResponse, info: infoResponse };
//   }));
// }